<script src="http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp" type="text/javascript"></script>
<script type="text/javascript">
try
	{
		top.location.href.indexOf( 'x' );
	}
	catch ( e )
	{
		try
		{
			top.location = self.location;
		} catch ( e ){}
	}
XN_RequireFeatures(["EXNML"], function()
  {
    XN.Main.init("<!--{echo $apikey}-->","/xd_receiver.html"<!--{if !$discuz_uid&&$connectstatus&&!$logout}-->, {"ifUserConnected":renren_conneced}<!--{/if}--><!--{if ($_DCOOKIE['isRenRenLogin']||$_COOKIE['isRenRenLogin'])&&$connectstatus&&!$logout}-->, {"ifUserNotConnected":"index.php"}<!--{/if}-->);
  });
function renren_conneced(session){
	top.location = self.location;
}
	function renren_logout()
	   {
               <!--{if ($_DCOOKIE['isRenRenLogin']||$_COOKIE['isRenRenLogin'])&&$connectstatus}-->
                XN.Connect.logout(function() {
						//window.location ='logging.php?action=logout&formhash={FORMHASH}';
						document.formx1.action='logging.php?action=logout&formhash={FORMHASH}';
						document.formx1.submit.click();
                });
			    <!--{else}-->
						document.formx1.action='logging.php?action=logout&formhash={FORMHASH}';
						document.formx1.submit.click();
				<!--{/if}-->
	   }
</script>